<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>申请书查看</title>
<c:if test="${empty param.include}">
	<%@ include file="/common/meta.jsp"%>
</c:if>
<style type="text/css">
.color_red{
	display:none;
}
#content{
    width:1040px;
}

</style>
<script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res_app}/js/app/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript">

var ctxpath = "${ctx}";
var prcWin = new progressWin("${res}");//初始化遮罩层

$(function(){
	//初始化合计
	if($(".countAmt")[1]){
    	$("#countAmtTable").show();
    }
	
	if("${param.viewAttach}"=="true")
		$("#tab9").click();
    if("${param.auditflag}"==""||"${param.auditflag}"==null)
		$("#tab1").click();
    if("${param.auditflag}"=="edit")
		$("#tab9").click();
	/* updatePdfNotes();
	window.setInterval("checkPdfStatus()", "10000");//检验申请书的pdf */
	refreshTextArea();
	resetTitle();
	
	$("table").addClass("table01");
	$("#checkbox_table_").removeClass("table01");
	$("#feaReport_upload1").removeClass("table01");
	$("#feaReport_upload2").removeClass("table01");
	$("div[id^='checkbox_dyn_']").find("table").removeClass("table01");
	/* $('div').find("[id^='checkbox_dyn_']").find("tr").removeClass("li_1").removeClass("li_2"); */
    $('div').find("[id^='checkbox_dyn_']").find("td").css("border",'0px solid');
    $("table").each(function(){ 
        $(this).find("tr").not(".cbTable tr").filter(":even").addClass("li_1");
        $(this).find("tr").not(".cbTable tr").filter(":odd").addClass("li_2");
    }); 
});

</script>
</head>
<body>
	<c:set var="xmlstr" value="${xmlData}" scope="request"/>
	<x:parse xml="${xmlstr}" var="xmlData" scope="request"/>
	<input type="hidden" id="childDiv" class="thickbox"/>
	<input type="hidden" id="filePath" value="${ctx}/file/ajax-filedownload?fileCode=" />
	<input type="hidden" id="menuId" value="${param.menuId}" />
	<div id="showMessage"></div>
	<div id="content">
		<div class="clear_h15"></div>
		<div class="word_box" id="mainDiv">
			<div class="bar_b">
				<security:authorize ifNotGranted="A_MENU_REVIEW_09"><c:if test="${not empty fbl.pdfViewUrl}"><a href="#" onclick="return genPdf('<iris:des3 code="${posCode}"/>','<iris:des3 code="${fbl.pdfCode}"/>');" class="yase ico_pdf">查看pdf</a></c:if></security:authorize>
				<input type="hidden" id="pdfStatus" value="${pdfStatus}" />
				<span class="right">版本号：<span name="proposal/prp_version" id="prp_version"><x:out select="$xmlData/data/proposal/prp_version" /></span></span>
			</div>
			<form method="post" id="mainForm">
				<input type="hidden" value="${grantCode}" id="grantCode"
					name="grantCode"> 
				<input type="hidden" value="${posCode}" id="posCode" name="posCode"> 
				<input type="hidden" value="${xmlData}" id="xmlData" name="xmlData">
				<input type="hidden" value="${fbl.pdfCode}" id="pdfCode" name="pdfCode"> 
			</form>
				<div class="word_title">
					<c:set var="statYear">${statYear}</c:set>
					<c:if test="${empty statYear}">
						<c:set var="statYear"><x:out select="$xmlData/data/proposal/stat_year" /></c:set>
					</c:if>
					<input type="hidden" name="proposal/stat_year" value="${statYear}">
					<span name="proposal/sub_grant_name" ><x:out select="$xmlData/data/proposal/sub_grant_name" /></span>-项目申请书 (<span name="proposal/stat_year">${statYear}</span>年)<%-- <br/>(<span name="proposal/sub_grant_name" ><x:out select="$xmlData/data/proposal/sub_grant_name" />)</span>			 --%>
					<input type="hidden" name="proposal/sub_grant_name" value="<x:out select="$xmlData/data/proposal/sub_grant_name" />" />
					<input type="hidden" name="proposal/grant_code" value="<x:out select="$xmlData/data/proposal/grant_code" />" />
					<input type="hidden" id="grant_no" name="proposal/grant_no" value="<x:out select="$xmlData/data/proposal/grant_no" />" />							
					<input type="hidden" name="proposal/sub_grant_code" value="<x:out select="$xmlData/data/proposal/sub_grant_code" />" />
					<input type="hidden" id="sub_grant_no" name="proposal/sub_grant_no" value="<x:out select="$xmlData/data/proposal/sub_grant_no" />" />
					<input type="hidden" name="proposal/help_grant_code" value="<x:out select="$xmlData/data/proposal/help_grant_code" />" />
					<input type="hidden" id="help_grant_no" name="proposal/help_grant_no" value="<x:out select="$xmlData/data/proposal/help_grant_no" />" />
					<c:set var="formCode"><x:out select="$xmlData/data/proposal/form_code" /></c:set>
					<c:if test="${empty formCode}"><c:set var="formCode" value="${param.formCode}"></c:set></c:if>
					<input type="hidden" name="proposal/form_code" value="${formCode}" />
				</div>
				<div id="tabnav">
					<ul>
						<li id="tab1" class="down" onclick="changeTab(this.id)">
						    <a href="###"><span>委托事项详情</span></a>
						</li>
						<li id="tab2" onclick="changeTab(this.id)">
						    <a href="###"><span>委托事项具体内容和要求</span></a>
						</li>
						<li id="tab3" onclick="changeTab(this.id)">
						    <a href="###"><span>甲方责任和义务</span></a>
						</li>
						<li id="tab4" onclick="changeTab(this.id)">
						    <a href="###"><span>乙方责任和义务</span></a>
						</li>
						<li id="tab5" onclick="changeTab(this.id)">
						    <a href="###"><span>经费预算</span></a>
						</li>
					</ul>
				</div>
				
				<!-- 委托事项详情 -->
				<div class="tab_box" id="fragment-tab1">
					<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
					<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
					<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
					<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>
					<input type="hidden" id="if_have_org" name="proposal/if_have_org">
				<div class="t_bar"><span class="color_red">*</span>委托事项详情</div>
					<table class="t_css" width="100%" id="basic_info_jzfp" border="0" cellpadding="0"
					    cellspacing="1">
					<col style="width: 25%"/>
					<col style="width: 25%"/>
					<col style="width: 25%"/>
					<col style="width: 25%"/>
					    <tr class="li_1">
					        <td align="right">委托处室（甲方）：</td>
					        <td colspan="3">
					            <span>
					            <x:out select="$xmlData/data/proposal/party_a"/>
					            </span>
					        </td>
					    </tr>
					    <tr>
							<td align="right" nowrap>受托单位（乙方）：</td>
							<td colspan="3">
								<span name="organizations/organization/org_name"><x:out select="$xmlData/data/organizations/organization/org_name" /></span>
							</td>
						</tr>
						<tr>
							<td align="right" nowrap>委托事项：</td>
							<td colspan="3">
								<span>
								<x:out select="$xmlData/data/proposal/zh_title"/>
								</span>
					        </td>
						</tr>
						<tr>
							<td align="right" nowrap>申请金额（万元）：</td>
							<td  align="center">
							<span >
								<x:out select="$xmlData/data/proposal/request_amt"/>
							</span>
							</td>
						   <td  align="right" >申报时间：</td>
							<td align="center">
								<span>
									<x:out select="$xmlData/data/proposal/submit_date" />
								</span>
							</td>
						</tr>
						<tr>
							 <td  align="right" >工作开始时间：</td>
							<td align="center">
								<span>
								<x:out select="$xmlData/data/proposal/start_date" />
								</span>
							</td>
							<td  align="right" >工作结束时间：</td>
							<td  align="center">
								<span>
								<x:out select="$xmlData/data/proposal/end_date" />
								</span>
							</td>
						</tr>
					</table>	
				</div>
				<!-- 委托事项具体内容和要求 -->
				<div class="tab_box" id="fragment-tab2" style="display: none">
				<div class="t_bar"><span class="color_red">*</span>委托事项具体内容和要求</div>
					<table id="fzr_info" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
						<tr>
							<td colspan="4">
								<textarea name="proposal/specific_demands" style="width:98%" class="input_textarea required  maxlength:5000" label="委托事项具体内容和要求"   rows=10 cols=60><x:out select="$xmlData/data/proposal/specific_demands" /></textarea>
								<input type="hidden" name="proposal/fzr_goal_hidden" id="proposal/fzr_goal_hidden" value="<x:out select="$xmlData/data/proposal/fzr_goal_hidden" />"/>
							</td> 
						</tr> 
					</table> 					
				</div>
				<!-- 甲方责任和义务-->
				<div class="tab_box" id="fragment-tab3" style="display: none">
					<div class="t_bar"><span class="color_red">*</span>甲方责任和义务</div>
					<table id="fzr_info" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
						<col style="width:34%"/>
						<col style="width:40%"/>
						<col style="width:13%"/>
						<col style="width:13%"/>
						<tr>
							<td colspan="4">
								<textarea name="proposal/responsibility_a" style="width:98%" class="input_textarea required  maxlength:5000" label="负责人简介"   rows=10 cols=60><x:out select="$xmlData/data/proposal/responsibility_a" /></textarea>
								<input type="hidden" name="proposal/fzr_goal_hidden" id="proposal/fzr_goal_hidden" value="<x:out select="$xmlData/data/proposal/fzr_goal_hidden" />"/>
							</td> 
						</tr> 
					</table>
				</div>
				<!-- 乙方责任和义务 -->
				<div class="tab_box" id="fragment-tab4" style="display: none">
					<div class="t_bar"><span class="color_red">*</span>乙方责任和义务</div>
					<table id="fzr_info" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
						<col style="width:34%"/>
						<col style="width:40%"/>
						<col style="width:13%"/>
						<col style="width:13%"/>
						<tr>
							<td colspan="4">
								<textarea name="proposal/responsibility_b" style="width:98%" class="input_textarea required  maxlength:5000" label="负责人简介"   rows=10 cols=60><x:out select="$xmlData/data/proposal/responsibility_b" /></textarea>
								<input type="hidden" name="proposal/fzr_goal_hidden" id="proposal/fzr_goal_hidden" value="<x:out select="$xmlData/data/proposal/fzr_goal_hidden" />"/>
							</td> 
						</tr> 
					</table>
				</div>
				<!-- 经费预算 -->
				<div class="tab_box" id="fragment-tab5" style="display: none">
					<div class="t_bar">
	<span class="color_red">*</span>经费预算
	</div>
		<table  id="eq_table1" cellpadding="0" class="t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
					<col style="width: 5%"/>
					<col style="width: 25%"/>
					<col style="width: 15%"/>
					<col style="width: 55%"/>
				<thead >
						<tr style="border:1px solid #B7D1E6">
							<th class="TblHead" align="center">序号</th>
							<th class="TblHead" align="center">经费科目</th>
							<th class="TblHead" align="center">经费预算（万元）</th>
							<th class="TblHead" align="center">具体用途</th>
						</tr>
				</thead>
				<tbody id="tab">
						<c:set value="0" var="index" scope="page"/>
						<x:forEach select="$xmlData/data/budgets/budget" var="budget">
						
						<c:choose>
							<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
							<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
						</c:choose>
						<tr >
							<td align="center">
								<span   name="budgets/budget[${flag}${index}]@seq_no" ><x:out select="$budget/@seq_no"/></span> 
							</td>
							
							<td align="left">
								<span type="text"  class="hn_iuput_kuang" style="width:80%;">
								<x:out select="$budget/eq_type" />
								</span>
							</td>
							<td align="center">
								<span type="text"  class="hn_iuput_kuang countAmt" style="width:80%;">
								<x:out select="$budget/eq_num" />
								</span>
							</td>
							<td align="left">
								<span type="text"  class="hn_iuput_kuang" style="width:80%;">
								<x:out select="$budget/eq_application" />
								</span>
							</td>
						</tr>
						<c:set value="${index+1}" var="index" scope="page"/>
						<script type="text/javascript">
							showAllDateTag("eq_table1");
						</script>
						</x:forEach>
						</tbody>
				</table>
				<table id="countAmtTable" cellpadding="0" class="t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;display:none;">
					<col style="width: 5%"/>
					<col style="width: 25%"/>
					<col style="width: 15%"/>
					<col style="width: 55%"/>
					<tr>
						<td align="center" colspan="2">
								合计
							</td>
							<td align="center">
								<x:out select="$xmlData/data/budgets/countamt" />
							</span>
							</td>
							<td align="center">
							/
							</td>
						</tr>
				</table>
			
	</div>
	<div class="clear_h15"></div>
	</div>
</body>
</html>